package it.unisa.unibox.junit.beans;

import it.unisa.unibox.beans.AreaScientifica;
import junit.framework.TestCase;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class AreaScientificaTest extends TestCase {

	private AreaScientifica area;

	@Override
	@Before
	public void setUp() {
		try {
			area=new AreaScientifica(4, "Farmacia Area", 12345);
		} catch (Exception e) {
			fail();
		}
	}

	@Override
	@After
	public void tearDown() {
		area=null;
		System.gc();	
	}

	@Test
	public void testGetId() {
		assertEquals(area.getId(), 4);
	}
	
	@Test
	public void testGetNome() {
		assertEquals(area.getNome(), "Farmacia Area");
	}

	@Test
	public void testGetCodice() {
		assertEquals(area.getCodice(), 12345);
	}

}
